#include <iostream>
#include <vector>
#include <queue>
using namespace std;

void test()
{
    int a[10] = {1, 41, 23, 10, 11, 2, -1, 99, 14, 0};

    priority_queue<int> heap1; // 默认大根堆
    priority_queue<int, vector<int>, less<int>> heap2; // 大根堆 priority_queue<数据类型, 存数据的结构, 数据之间的比较方式>
    priority_queue<int, vector<int>, greater<int>> heap3; // 小根堆
    // 测试
    for(auto x : a)
    {
        heap1.push(x);
        heap2.push(x);
        heap3.push(x);
    }
    while(heap1.size())
    {
        cout << heap1.top() << " ";
        heap1.pop();
    }
    cout << endl;
    while(heap2.size())
    {
        cout << heap2.top() << " ";
        heap2.pop();
    }
    cout << endl;
    while(heap3.size())
    {
        cout << heap3.top() << " ";
        heap3.pop();
    }
    cout << endl;
}
int main()
{
    test();
    return 0;
}